package day7;

import java.util.Arrays;

/**
 * @Author juzipi
 * @Date 2021/6/12 10:33
 * @Info
 */
public class ArraysCopyDemo {

    public static void main(String[] args) {
        int[] a = {1, 2, 3};
        int[] b = {1, 2, 3};

        int[] ints = {213, 4654, 1415, 145, 184, 21, 651, 6, 4, 651, 65, 16, 51, 651, 65, 1, 3651, 65};
        //排序，底层就是快排了
        Arrays.sort(ints);
        //toString
        System.out.println(Arrays.toString(ints));
        //equals
        System.out.println(Arrays.equals(a, b));

        Arrays.fill(a,10);
        System.out.println(Arrays.toString(a));

        int[] arr = {35, 165, 156, 16, 541, 65, 16, 51, 65, 16, 51, 651};
        //没找到或者有多个都是返回 负值？
        int i = Arrays.binarySearch(arr, 352355);
        System.out.println(i);

    }

}
